#include <iostream>

#include "metrics/MetricRegistry.hpp"
#include "metrics/ConsoleMetricReporter.hpp"

namespace metrics
{
    ConsoleMetricReporter::ConsoleMetricReporter()
    {
    }

    ConsoleMetricReporter::~ConsoleMetricReporter()
    {
    }

    void ConsoleMetricReporter::run()
    {
        auto metrics = _registry->collect();

        for (auto &metric : metrics)
        {
            auto lines = _formatter.format(metric);
            for (auto line : lines)
            {
                std::cout << line << std::endl;
            }
        }
    }

} // namespace metrcis